import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import './filters/actors'
// 网络请求
import api from "./api"
Vue.prototype.$api = api

// 全局过滤器
import './filters'

// 全局混入
import './mixin'

// iconfont引入
import './assets/iconfont/iconfont.css'

// vant引入
import Vant from 'vant'
import 'vant/lib/index.css'
Vue.use(Vant)

// elementUI引入
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
Vue.use(ElementUI)

// 图片懒加载
import VueLazyload from 'vue-lazyload'
Vue.use(VueLazyload, {
  loading: require("../src/assets/img/logo.png"), //加载中图片，一定要有，不然会一直重复加载占位图
  error: "https://timgsa.baidu.com/timg?image&quality=80&size=b9999_10000&sec=1606756816634&di=534b6e1d444a96ad1fac3d439cf69a44&imgtype=0&src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fitem%2F202011%2F23%2F20201123075148_bmsos.thumb.1000_0.jpeg", //加载失败图片
})
// 全局懒加载组件
import './components/all/index'
// 事件总线
const eventBus = new Vue()
// 原型链
Vue.prototype.$eventBus = eventBus

// 图片放大
import VueDirectiveImagePreviewer from 'vue-directive-image-previewer'
import 'vue-directive-image-previewer/dist/assets/style.css'
Vue.use(VueDirectiveImagePreviewer) 


Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')